<script>
jQuery(document).ready(function($){	

	$("#voltar").click(function() {

		var unitid = "<?php echo $unitid?>";
		var url = "<?php echo WWW_APP.'history/exams/unit/'?>"+unitid; 

		window.location.href = url;
	}); 
});
</script>
<div id="questionsList">
	
	<br /><br />
	
	<?php
	$i = 1;	
	foreach($allQuestions as $key=>$question) {	
	?>	
		Questão <?php echo $i?> - <?php echo $question->question?>
		<br /><br />
		<input type="radio" name="question_<?php echo $question->id?>" value="1" disabled="disabled"> 
		<?php echo $question->answer_1.'<br />'?>
		<input type="radio" name="question_<?php echo $question->id?>" value="2" disabled="disabled"> 
		<?php echo $question->answer_2.'<br />'?>
		<input type="radio" name="question_<?php echo $question->id?>" value="3" disabled="disabled"> 
		<?php echo $question->answer_3.'<br />'?>
		<input type="radio" name="question_<?php echo $question->id?>" value="4" disabled="disabled"> 
		<?php echo $question->answer_4.'<br />'?>
		<input type="radio" name="question_<?php echo $question->id?>" value="5" disabled="disabled"> 
		<?php echo $question->answer_5.'<br /><br />'?>	
		
		<?php 
		if($question->marked == $question->answer_correct) {
		?>
			<div id="certo">
				<img alt="Correto" src="<?php echo WWW_ROOT.'img/correto.png'?>">
				Acertou. Reposta certa (<?php echo $question->marked?>)	
				<br /><br /><hr><br />		
			</div>
		<?php 
		}else {			
		?>
			<div id="Errado">
				<img alt="Errado" src="<?php echo WWW_ROOT.'img/errado.png'?>">
				Errou. Você respondeu (<?php echo $question->marked?>). O certo é (<?php echo $question->answer_correct?>)
				<br /><br /><hr><br />		
			</div>
		<?php 
		}
		?>
	<?php 
		$i++;
	}
	?>
	
	<br /><br />
	<div id="nota">
		<?php 
		if($note >= 7) {
			echo "Parabéns, você foi aprovado<br />Sua nota foi: ".$note;
		}else {
			echo "Infelizmente você não foi aprovado<br />Sua nota foi: ".$note;
		}
		?>
	</div>	
	<br class="clear" />
	<input id="voltar" type="button" value="Voltar" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
</div>